//
// CLandscapeModel.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CVector;

public class CLandscapeModel {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CLandscapeModel(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CLandscapeModel obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        throw new UnsupportedOperationException("C++ destructor does not have public access");
      }
      swigCPtr = 0;
    }
  }

  public static void registerBasic() {
    nel3dJNI.CLandscapeModel_registerBasic();
  }

  public void setLandscape(CLandscape value) {
    nel3dJNI.CLandscapeModel_Landscape_set(swigCPtr, this, CLandscape.getCPtr(value), value);
  }

  public CLandscape getLandscape() {
    long cPtr = nel3dJNI.CLandscapeModel_Landscape_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CLandscape(cPtr, false);
  }

  public void setAdditive(float additive) {
    nel3dJNI.CLandscapeModel_setAdditive(swigCPtr, this, additive);
  }

  public float getAdditive() {
    return nel3dJNI.CLandscapeModel_getAdditive(swigCPtr, this);
  }

  public void enableAdditive(boolean enable) {
    nel3dJNI.CLandscapeModel_enableAdditive(swigCPtr, this, enable);
  }

  public boolean isAdditive() {
    return nel3dJNI.CLandscapeModel_isAdditive(swigCPtr, this);
  }

  public void setRefineCenterAuto(boolean mode) {
    nel3dJNI.CLandscapeModel_setRefineCenterAuto(swigCPtr, this, mode);
  }

  public boolean getRefineCenterAuto() {
    return nel3dJNI.CLandscapeModel_getRefineCenterAuto(swigCPtr, this);
  }

  public void setRefineCenterUser(CVector refineCenter) {
    nel3dJNI.CLandscapeModel_setRefineCenterUser(swigCPtr, this, CVector.getCPtr(refineCenter), refineCenter);
  }

  public CVector getRefineCenterUser() {
    return new CVector(nel3dJNI.CLandscapeModel_getRefineCenterUser(swigCPtr, this), false);
  }

  public void initModel() {
    nel3dJNI.CLandscapeModel_initModel(swigCPtr, this);
  }

  public void traverseHrc() {
    nel3dJNI.CLandscapeModel_traverseHrc(swigCPtr, this);
  }

  public void traverseClip() {
    nel3dJNI.CLandscapeModel_traverseClip(swigCPtr, this);
  }

  public boolean clip() {
    return nel3dJNI.CLandscapeModel_clip(swigCPtr, this);
  }

  public void traverseRender() {
    nel3dJNI.CLandscapeModel_traverseRender(swigCPtr, this);
  }

  public void profileRender() {
    nel3dJNI.CLandscapeModel_profileRender(swigCPtr, this);
  }

  public void clipAndRenderLandscape() {
    nel3dJNI.CLandscapeModel_clipAndRenderLandscape(swigCPtr, this);
  }

  public void getReceiverBBox(SWIGTYPE_p_CAABBox bbox) {
    nel3dJNI.CLandscapeModel_getReceiverBBox(swigCPtr, this, SWIGTYPE_p_CAABBox.getCPtr(bbox));
  }

  public void receiveShadowMap(CShadowMap shadowMap, CVector casterPos, CMaterial shadowMat) {
    nel3dJNI.CLandscapeModel_receiveShadowMap(swigCPtr, this, CShadowMap.getCPtr(shadowMap), shadowMap, CVector.getCPtr(casterPos), casterPos, CMaterial.getCPtr(shadowMat), shadowMat);
  }

  public SWIGTYPE_p_NLMISC__CMatrix getReceiverRenderWorldMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CLandscapeModel_getReceiverRenderWorldMatrix(swigCPtr, this), false);
  }

}
